package com.tchintech.pay.delegate;

import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Spinner;
import android.widget.TextView;

import com.tchintech.pay.R;
import com.tchintech.pay.frame.view.AppDelegate;

import butterknife.Bind;

/**
 * Created by Administrator on 2017/7/6 0006.
 */

public class OrderActivityDelegate extends AppDelegate {

    @Bind(R.id.order_tv_tips)
    TextView orderTvTips;
    @Bind(R.id.order_tv_phonenumber)
    TextView orderTvPhonenumber;
    @Bind(R.id.order_tv_userstate)
    TextView orderTvUserstate;
    @Bind(R.id.order_ed_amount)
    EditText orderEdAmount;
    @Bind(R.id.order_sp_payType)
    Spinner orderSpPayType;
    @Bind(R.id.order_bt_create)
    Button orderBtCreate;
    @Bind(R.id.order_bt_query)
    TextView orderBtQuery;

    @Override
    public int getRootLayoutId() {
        return R.layout.activity_order;
    }
    public String  getText(int id){
        String  text="";
        try{
            EditText et=get(id);
            text=et.getText().toString().trim();
        }catch(Exception e){
            e.printStackTrace();
        }
        return  text;
    };


    //异常提示消息
    public void setTip(String  text){
        orderTvTips.setText(text);
    }


    public EditText getEdittView(int id){
        EditText text=null;
        try{
            text=get(id);
        }catch (Exception e){
            e.printStackTrace();
        }
        return  text;
    };


    public TextView getTextView(int id){
        TextView text=null;
        try{
            text=get(id);
        }catch (Exception e){
            e.printStackTrace();
        }
        return  text;
    };
    public View getView(int id){
        View text=null;
        try{
            text=get(id);
        }catch (Exception e){
            e.printStackTrace();
        }
        return  text;
    };
}
